package net.huashitong.ssydt.provider.alipay.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 类名：AlipayConfig
 * 功能：基础配置类
 * 详细：设置帐户有关信息及返回路径
 *
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.08.17
 */
@Component
@ConfigurationProperties(prefix = "net.huashitong.alipay")
public class AlipayAppConfig {


    // 合作身份者ID，签约账号，以2088开头由16位纯数字组成的字符串，查看地址：https://b.alipay.com/order/pidAndKey.htm
    private String appID = "2017082108308077";

    //商户的私钥,需要PKCS8格式，RSA公私钥生成：https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.nBDxfy&treeId=58&articleId=103242&docType=1
    private String privatekey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCMoLhSJi20fgVVISA2IHX7+PKmAZ5xq9f1Ucm666VKpYUZstU6N3SVVxCE3X1bCry5rZDep/JL9PAVfS8wcpV5wMI7e738H3Nxcdq0n9QQcDY3qd5Qedvgc9viQLluJRXUnkPWLKW6RceKonJ14lWntFrkcmnXwuB7810DBjm2NzZVEGchjhDtuuFr8HA5ZmHaZ52Ja5fZxbpF0/Mlnymvn19WQMSY9tlM5YBq61/YLG7C89NkU27CyUpM0zpqpGxe6fRfG5TKZ09Bj6OvOWRCIRBG3bLXomYrtfqUCPKITJLF2O2WkCX/i2dCKDmQqCxSxh9POhzzrp9NQk5BfSHrAgMBAAECggEAOrKfHRL4gt0TJrxj8JPOC3WW+rm0Q+ghhTE1TcMsRCMgkmB15g3dqLQlnf/BYi3yJmKPFJDvbsr3J1EQUF2TjLVrnV6CJ2mNSy3lxvzrjEz6JHPP6rFimKZjgmXXwGTUXuIMmKocJssXhgNWWWQ2soBya+ZhzYB3KOWkzi1cC3UTDwtXVnIR1RUmRdC+ee8djjXRX7NbwqtuNK6SGqbw5NK9VIqCGxfCV8/7r5H+7X/unAqLBed4bYbZPVxV0r6fpCNTvsJiOEi3yogGXNfT257vlnf+xPhAGDwxn4ITVkrR6oG9sa183FgrLzSTeft13fYHcAeVeaAc73msXTmsKQKBgQDSBlskecXHFmnjmHr/Z2+VbKQC9Or1xKlOWsbFkkS6n8oMdK6CNmioS+goSuqffQV8/d2659GqojROvU/daCVfwXBWwEhkRioVYEfkXSY3n0rR0cvtNpOTmsELXhUZdtIMnWVqe4xHsevCrhONAlqKgT3sZcrk2i7qMXQm8O2CzwKBgQCraWdnatYggOHM9OMNpt9N5lDh9h0Ls5XBPOvRNKxtZfP7BYJc1e1v/993qsg7K+l8jkNfBEZDF9t4+vrjNX7eK+Rb7sg/7HSNbgYDwpSJ73wCC3kFeQNSBgmW/deYpDB4A6z/xlHPSzpCDKEGhcwJs9kZTBmo24DJrEZt//mmJQKBgQDR4xQ2cZNbEGUl0/4nO2FhvL5zTft5PN3Nth4q16/jqUgsBndXHbSda65IhgXO+QwBC1sJLB52Hb+UaNBlfWzMMu5nY6V0wEHSNvPhnc1RjNkisjzPhNkai28cQxtm5T2o6aquLWXVSFNJrNlQ8+czv1D47AlFh12XIXDocaGKNQKBgQCFNmE6KflHQWI6WoaqcWlRrRBmy1I/ac2UY7gQ2hK24mj+SIXLiCYCyKPu6Da8ZaALQLRy/2trcPsLxmF8enKiTxIlsCjIJQdfcoYSHgI6QHfrTuc6rZU7BZ4mThhjdBaG7rRgAsxJgXlBI3dxDkJHuBGca1v1ssEf+lax3iEyUQKBgFUVhWCEoSKArdyFjoIWTi1bIxgeUHz6+j+ophT3H1tvwFluz9aRHf5DcuzuXyGDQsUkyN6Lm0rTn9mgC5dfEJdlBpaSzTLXHMUFtSydb8uFP58TyiZo8JFJHnNHdPsc84PiDrlY1itiV6EWie7oZEiMLPo6ek6CqR61PWi9n5W0";

    // 支付宝的公钥,查看地址：https://b.alipay.com/order/pidAndKey.htm
    private String alipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhS2/UvspYj2lAmZccSJVNtd+FfVmI7mMDHlOOxnjirOiB6Ag438vHpxpLq+d7j28++TVIlsbupCG23liPuD8W/bC1kBzK0MdgJZpAorWNfDsU4rzjvbkBA77A6QoB1Bjxy9JEYD6dzVjUwN8whbkHaVztXC6C4PwUzdoIybNeoH2aSwYM41lGPaKLSfU2E32N6AahIL19AQLBu8eNmR1qdeEbBxkg0gNt8RiF3E2Tp9cPV0dOlACP0IgIFimfrATV2VycJDjX7d0NS9CQXZRGukN1KlfApoc1JWqtT/KIxEbSW4AaaKZqQwYk/aNdvxjUt2mEX16lusmZJpYUlS3YwIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
//    private String notifyUrl = "http://xingce.huashitong.net/pay/modules/alipay/notify";//生产环境
    private String notifyUrl = "http://huashitong.iok.la:7777/alipay/pay/notify";//测试环境

    // 字符编码格式 目前支持 gbk 或 utf-8
    private String inputCharset = "utf-8";

    public String getAppID() {
        return appID;
    }

    public void setAppID(String appID) {
        this.appID = appID;
    }

    public String getPrivatekey() {
        return privatekey;
    }

    public void setPrivatekey(String privatekey) {
        this.privatekey = privatekey;
    }

    public String getAlipayPublicKey() {
        return alipayPublicKey;
    }

    public void setAlipayPublicKey(String alipayPublicKey) {
        this.alipayPublicKey = alipayPublicKey;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getInputCharset() {
        return inputCharset;
    }

    public void setInputCharset(String inputCharset) {
        this.inputCharset = inputCharset;
    }
}
